<?php
class Control_Game_getServersByPlatform {

	function getServersByPlatform() {
		$game = MooForm::request('game');
		$game = MooObj::get('Game')->transportGame($game);
		$platform = MooForm::request('platform');
		$gameinfoConf = MooObj::get('Game')->getGameConf();
		$serverNum = $gameinfoConf[$game]['serverNum'][$platform];
	
		$pageNameArr = array();
		if($gameinfoConf[$game]['serverIds'][$platform]){
			$pageNameArr['servers'] = $gameinfoConf[$game]['serverIds'][$platform];
		}
		/*else {
			$serverNum = $gameinfoConf[$game]['serverNum'][$platform];
			for($i = 1; $i <= $serverNum; $i ++) {
				$pageNameArr['servers'][] = $i;
			}
		}*/
	
		exit(MooJson::encode($pageNameArr));
	}
}
